<?php

use Hyperf\HttpServer\Router\Router;

Router::addGroup('/organs/backend/',function (){
    Router::post('current',[\App\Controller\System\SystemController::class,'current']);
});

Router::addGroup('/organs/backend/sp/',function(){
    Router::post('current',[\App\Controller\System\SystemController::class,'current']);
    Router::post('division',[\App\Controller\Backend\Division\DivisionController::class,'getDivision']);
    Router::post('division/add',[\App\Controller\Backend\Division\DivisionController::class,'addDivision']);
    Router::post('user/add',[\App\Controller\Backend\User\UserController::class,'addUser']);
    Router::post('user/list/{divisionId}',[\App\Controller\Backend\User\UserController::class,'getUserListByDivision']);
    Router::post('agencyCompany/add',[\App\Controller\Backend\Agency\AgencyCompanyController::class,'addAgencyCompany']);
    Router::post('agencyCompany/list',[\App\Controller\Backend\Agency\AgencyCompanyController::class,'getAgencyCompanyList']);
    Router::post('agencyCompany/info',[\App\Controller\Backend\Agency\AgencyCompanyController::class,'getAgencyCompanyInfo']);
    Router::post('agencyCompany/del',[\App\Controller\Backend\Agency\AgencyCompanyController::class,'delAgencyCompany']);
    Router::post('agencyCompany/edit',[\App\Controller\Backend\Agency\AgencyCompanyController::class,'updateAgencyCompany']);
    Router::post('agencyCompany/select',[\App\Controller\Backend\Agency\AgencyCompanyController::class,'getAgencyCompanySelect']);
},[
    'middleware' => [
        \App\Middleware\Login\LoginMiddleware::class,
    ]
]);




Router::addGroup('/organs/backend/user/',function (){
    Router::post('getPublicKey',[\App\Controller\Backend\User\UserController::class,'getUserPuKey']);
    Router::post('accountLogin',[\App\Controller\Backend\User\UserController::class,'accountLogin']);
});

